<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
	xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
	layout:decorate="~{admin/layout/parent}">
<head>
	<title id="pageTitle">活动管理新增</title>
</head>
<body>

<th:block layout:fragment="page-content">
<div class="card-box">
	<div class="page-form">
		<div class="row">
			<div class="col-md-12 col-lg-9">
				<form id="form" class="form-horizontal form">
					<div class="form-group">
						<label class="col-sm-3 control-label no-padding-right" for="type">
							<span class="text-danger">* </span>活动类型
						</label>
						<div class="col-sm-9">
							<select class="form-control" name="type">
								<option value="">请选择活动类型</option>
								<option th:each="type : ${types}" th:value="${type.key}">[(${type.value})]</option>
							</select>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label no-padding-right" for="sort">
							<span class="text-danger">* </span>活动代码
						</label>
						<div class="col-sm-9">
							<input class="form-control" type="text" name="code" placeholder="请输入活动代码">
							<span class="font-13 text-muted">可作为菜单KEY，或者关键字回复等，不能与已添加的重复</span><br>
							<span class="font-13 text-muted">例如：WX_BUTTON_1111、彩色星期天，为充值折扣时填写：PAY</span>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label no-padding-right" for="sort">
							<span class="text-danger">* </span>开始时间
						</label>
						<div class="col-sm-9">
							<input class="form-control" type="text" name="startTime" placeholder="请输入开始时间 yyyy-MM-dd HH:mm:ss">
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label no-padding-right" for="sort">
							<span class="text-danger">* </span>结束时间
						</label>
						<div class="col-sm-9">
							<input class="form-control" type="text" name="endTime" placeholder="请输入结束时间  yyyy-MM-dd HH:mm:ss">
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label no-padding-right" for="type">
							<span class="text-danger">* </span>活动周期
						</label>
						<div class="col-sm-9">
							<select class="form-control" name="cycle">
								<option value="">请选择活动周期</option>
								<option th:each="cycle : ${cycles}" th:value="${cycle.key}">[(${cycle.value})]</option>
							</select>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label no-padding-right" for="sort">
							<span class="text-danger">* </span>活动说明
						</label>
						<div class="col-sm-9">
							<input class="form-control" type="text" name="content" placeholder="请输入活动内容">
							<span class="font-13 text-muted">例如：双11活动赠送，为充值折扣时填写折扣率，如：0.95</span>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label no-padding-right" for="sort">
							赠送彩豆规则
						</label>
						<div class="col-sm-9">
							<input class="form-control" type="text" name="ruleCaidou" placeholder="请输入活动赠送彩豆">
							<span class="font-13 text-muted">例如：1.2(固定)，0-1(随机0到1之间取值，保留2位小数)，为空表示不赠送</span>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label no-padding-right" for="sort">
							赠送积分规则
						</label>
						<div class="col-sm-9">
							<input class="form-control" type="text" name="ruleCredit" placeholder="请输入活动赠送积分">
							<span class="font-13 text-muted">例如：2(固定)，0-5(随机0到5之间取值，取整)，为空表示不赠送</span>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label no-padding-right" for="sort">
							赠送经验规则
						</label>
						<div class="col-sm-9">
							<input class="form-control" type="text" name="ruleExp" placeholder="请输入活动赠送经验">
							<span class="font-13 text-muted">例如：2(固定)，0-5(随机0到5之间取值，取整)，为空表示不赠送</span>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label no-padding-right" for="sort">
							开始之前提示配置
						</label>
						<div class="col-sm-9">
							<textarea class="form-control" name="beforeMessage" placeholder="请输入开始之前提示配置"></textarea>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label no-padding-right" for="sort">
							结束之后提示配置
						</label>
						<div class="col-sm-9">
							<textarea class="form-control" name="afterMessage" placeholder="请输入结束之后提示配置"></textarea>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label no-padding-right" for="sort">
							成功参与提示配置
						</label>
						<div class="col-sm-9">
							<textarea class="form-control" type="text" name="completeMessage" placeholder="请输入成功参与提示配置"></textarea>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-3 control-label no-padding-right" for="sort">
							已经参与提示配置
						</label>
						<div class="col-sm-9">
							<textarea class="form-control" type="text" name="finishMessage" placeholder="请输入已经参与提示配置"></textarea>
						</div>
					</div>
					<div class="form-group text-right m-b-0">
						<button id="btn-save" class="ladda-button btn btn-primary waves-effect waves-light" type="button" data-style="expand-left"><i class="fa fa-save"></i> 提交</button>
						<a class="btn btn-white waves-effect waves-light" href="javascript:window.history.go(-1);"><i class="fa fa-reply"></i> 返回</a>
					</div>
				</form>
			</div>
			<div class="col-md-12 col-lg-3">
				<p class="text-danger"> 填写注意事项： </p>
				<p>1.标<span class="text-danger"> * </span>的字段必填</p>
				<p>2.提示配置说明<br>
					&nbsp;&nbsp;&nbsp;纯文字格式：<br>
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="text-pink">text@{content}</span><br>
					&nbsp;&nbsp;&nbsp;单图文格式：<br>
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="text-pink">news@{title}@{description}@{url}</span><br>
					&nbsp;&nbsp;&nbsp;暂不支持多图文和含图片的单图文<br>
					&nbsp;&nbsp;&nbsp;其中 {description} 可配置参数：<br>
					&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="text-pink">#caidou#、#credit#、#exp#</span><br>
					&nbsp;&nbsp;&nbsp;对应赠送规则，开始之前和结束之后不要设置
				</p>
				<p>3.时间格式严格按照指定格式填写</p>
				<p>4.充值折扣说明：<br>
					&nbsp;&nbsp;&nbsp;活动代码只能填写<span class="text-pink"> PAY </span>其它无效；<br>
					&nbsp;&nbsp;&nbsp;开始结束时间表示在该时间段内享受折扣；<br>
					&nbsp;&nbsp;&nbsp;活动说明填写折扣率，0-1内的小数；
				</p>
			</div>
		</div>
	</div>
</div>

</th:block>
<th:block layout:fragment="page-plugin">
	
</th:block>
<th:block layout:fragment="page-js">
<script type="text/javascript" th:src="@{/page/admin/sys/activity-add.js}"></script>
</th:block>
</body>

</html>
